<?php

//获取MYSQL库配置
list($db) = require(__DIR__ . "/../../conf/env/db.php");
//获取REDIS配置
$cache = require(__DIR__ . "/../../conf/env/cache.php");
$redis = require(__DIR__ . "/../../conf/env/redis.php");
require (__DIR__ . '/../../Xpyun/Autoloader.php');

/**
 * Xprinter 小票和标签打印机
 * *必填*：开发者ID ：芯烨云后台注册账号（即邮箱地址或开发者ID），开发者用户注册成功之后，登录芯烨云后台，在【个人中心=》账号信息】下可查看开发者ID
 * 必填*：开发者密钥 ：芯烨云后台注册账号后自动生成的开发者密钥，开发者用户注册成功之后，登录芯烨云后台，在【个人中心=》账号信息】下可查看开发者密钥
 */
define('USER_NAME', '18876682583@163.com');
define('USER_KEY', '8cf4a9f7372546f0a919767e9538ab9d');

return [
    'aliases' => [
        '@bower' => '@vendor/bower-asset',
        '@npm' => '@vendor/npm-asset',
    ],
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'layout' => false, // 禁用api应用的默认布局
    'components' => [
        'db' => $db,
        // 'dfdb' => $dfdb,
        'cache' => $cache,
        'redis' => $redis,
        'queue' => [
            'class' => \yii\queue\redis\Queue::class,
            'redis' => 'redis',
            'channel' => 'DOUYIN:QUEUE',
            'as log' => \yii\queue\LogBehavior::class,
        ],
        'writeLog' => [
            'class' => 'common\components\WriteLog',
        ],
        'excel' => [
            'class' => \common\tools\Excel::class,
        ]
    ],
];
